package com.higold.cloud.mvp.model

import com.higold.cloud.mvp.model.bean.UploadPic
import com.higold.cloud.mvp.model.bean.developList.DevelopList
import com.higold.cloud.net.RetrofitManager
import com.higold.cloud.rx.scheduler.SchedulerUtils
import io.reactivex.Observable
import okhttp3.MultipartBody

/**
 *    author : lxz
 *    date   : 2019/9/7 10:37
 *    desc   :
 */
class DevelopListModel {

    /**
     * 上传图片
     */
    fun requestUploadPic(value: MultipartBody.Part): Observable<UploadPic> {

        return RetrofitManager.service.upLoadImg(value)
                .compose(SchedulerUtils.ioToMain())
    }

    /**
     * 门店列表
     */
    fun requestDevelopList(): Observable<DevelopList> {

        return RetrofitManager.service.requestDevelopList(1)
                .compose(SchedulerUtils.ioToMain())
    }
}